<?php 
	session_start(); 
	if (!$_SESSION["id_no"])
    {
        Header("Location: index.php");
    }
	else{
		if ($_SESSION['account_type']=='root'){
		$header="secured/header_login";
		$admin="yes";
		}
		elseif($_SESSION['account_type']=='Admin'){ 
			$header="secured/header_login";
			$admin="yes";
		}else{
			$header="header";
			$admin="no";
		}
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Ralimo System Panel</title>
<link rel="stylesheet" href="css/screen.css" type="text/css" media="screen" title="default" />
<link rel="stylesheet" href="css/jquery-ui-1.8.21.custom.css" type="text/css" media="screen" title="default" />
<!--[if IE]>
<link rel="stylesheet" media="all" type="text/css" href="css/pro_dropline_ie.css" />
<![endif]-->
<!--  jquery core -->
<script src="js/jquery/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="js/jquery/jquery-ui-1.8.21.custom.min.js" type="text/javascript"></script>
<!--  date picker script -->
<link rel="stylesheet" href="css/datePicker.css" type="text/css" />
<script type="text/javascript" src="js/jquery/infowindow.js"></script>
</head>
<body> 
<?php 
	include"template/$header.php"; 
	include("query/db_connection.php");
	$city_id = $_GET['id'];
	$sql ="SELECT
			affiliate.companyname,
			affiliate.companyaddress,
			affiliate.companyemail,
			affiliate.cityid,
			affiliate.landline,
			affiliate.mobileno1,
			affiliate.contactname,
			affiliate.websiteurl,
			affiliate.contactemail
			FROM
			affiliate
			WHERE
			 cityid='$city_id'";
	$res = mysql_query($sql);
	
	$sql2="SELECT
			*
			FROM
			city
			WHERE
			cityid='$city_id'";
	$res2 = mysql_query($sql2);
	while($row = mysql_fetch_array($res2)){
		$cityname = $row['cityname'];
		$zipcode  = $row['zipcode'];
	}
?>
  <div class='clear'></div>
<!-- start content-outer ........................................................................................................................START -->
	<div id='content-outer'>
	<!-- start content -->
	<div id='content'>

	<!--  start page-heading -->
	<div id='page-heading'>
		<h1>City Information of <?php echo $cityname;?></h1>
	</div>
	<!-- end page-heading -->
	<br />
	
	<div id="back_affiliate_cities_view">
		<a href="panel.php?page=city"><img style="border:none;" src="images/forms/back.png" /></a>
	</div>
	
	<table border='0' width='100%' cellpadding='0' cellspacing='0' id='content-table'>
	<tr>
		<th rowspan='3' class='sized'><img src='images/shared/side_shadowleft.jpg' width='20' height='300' alt='' /></th>
		<th class='topleft'></th>
		<td id='tbl-border-top'>&nbsp;</td>
		<th class='topright'></th>
		<th rowspan='3' class='sized'><img src='images/shared/side_shadowright.jpg' width='20' height='300' alt='' /></th>
	</tr>
	<tr>
		<td id='tbl-border-left'></td>
		<td>
		<!--  start content-table-inner ...................................................................... START -->
		<div id='content-table-inner'>
						<!--  start step-holder -->
		
		<!--  end step-holder -->
		
			<!--  start table-content  -->
			<form action="" method="post">
			<div id='table-content'>
				<table border="0" cellpadding="0" cellspacing="0" id="id-form" >
					<tr>
					<?php
						while($row = mysql_fetch_array($res)){
						echo"<tr>
								<td>
									<strong style='font-size:16px;'>Company Name: &nbsp;".$row['companyname']."</strong>
								</td>
							 </tr>
							 <tr>
								<td>
									<strong style='font-size:16px;'>Address: &nbsp;".$row['companyaddress']."</strong>
								</td>
							 </tr>
							 <tr>
								<td>
									<strong style='text-decoration:underline;'>Other Informations</strong>
								</td>
							 </tr>
							 <tr>
								<td>
									<strong>Company Email: &nbsp;".$row['companyemail']."</strong>
								</td>
							 </tr>
							 <tr>
								<td>
									<strong>Contact Number: &nbsp;".$row['landline']."</strong>
								</td>
							 </tr>
							 <tr>
								<td>
									<strong>Mobile Number: &nbsp;".$row['mobileno1']."</strong>
								</td>
							 </tr>
							 <tr>
								<td>
									<strong>Website URL: &nbsp;<a id='link_hover' target='_blank' href='".$row['websiteurl']."'>".$row['websiteurl']."</a></strong>
								</td>
							 </tr>
							 <tr>
								<td>
									<strong>Contact Name: &nbsp;".$row['contactname']."</strong>
								</td>
							 </tr>
							 <tr>
								<td>
									<strong>Contact Email: &nbsp;".$row['contactemail']."</strong>
								</td>
							 </tr>";
						}
					?>
					</tr>
				</table>
			</div>
			</form>
			<!--  end table-content  -->
	
			<div class='clear'></div>
		 
		</div>
		<!--  end content-table-inner ............................................END  -->
		</td>
		<td id='tbl-border-right'></td>
	</tr>
	<tr>
		<th class='sized bottomleft'></th>
		<td id='tbl-border-bottom'>&nbsp;</td>
		<th class='sized bottomright'></th>
	</tr>
	</table>
	<div class='clear'>&nbsp;</div>

	</div>
	<!--  end content -->
	<div class='clear'>&nbsp;</div>
	</div>
	<!--  end content-outer........................................................END -->";
				
<!--  start nav-outer-repeat................................................... END -->

  <div class="clear"></div>
 
<!-- start content-outer ........................................................................................................................START -->
<div id="content-outer">
<!-- start content -->
<!--  end content -->
<div class="clear">&nbsp;</div>
</div>
<!--  end content-outer........................................................END -->

<div class="clear">&nbsp;</div>
    
<?php include"template/footer.php"; ?>
 
</body>
</html>